/*
 * @Author: wangc
 * @Date: 2021-03-15 12:54:06
 * @Description: login  8088
 */
import { request } from '@/utils/request'

// 登录
export function getLogin(data, callBack) {
    return request({
        url: '/auth/login_4_worker',
        method: 'post',
        data,
        isUser: true,
        isFile: true,
        noLogin: true
    }, callBack)
}

// 刷新token
export function refreshToken(data, callBack) {
    return request({
        url: '/auth/refresh',
        method: 'get',
        data,
        isUser: true,
        isFile: true,
        noLogin: true,
        hidden: true,
    }, callBack)
}

// 扫码
export function scanToLogin(data, callBack) {
    return request({
        url: '/work_station/login_4_worker',
        method: 'post',
        data,
        isUser: true,
        isFile: true,
        noLogin: true
    }, callBack)
}

// 登录
export function logout(data, callBack) {
    return request({
        url: '/auth/logout_4_admin',
        method: 'get',
        data,
        isUser: true,
        isFile: true,
        noLogin: true
    }, callBack)
}